<?php
get_header();

get_sidebar();
?>
          <div class="right-content">
            	<!-- 轮播开始 -->
                <div class="imageRotation">   
                        <ul class="bxslider">
							  <li><a href="http://cozyconetech.com/product/power-station-7500mah-%EF%BC%88apple-white%EF%BC%89/" target="_blank"><img src="wp-content/themes/website1/images/101.png" /></a></li>
							  <li><a href="http://cozyconetech.com/product/earplug-mono-bluetooth-earphone-mini-type-l102black/" target="_blank"><img src="wp-content/themes/website1/images/102.png" /></a></li>
							  <li><a href="http://cozyconetech.com/product/3-in-1-car-charger-without-30-pin-apple-cable/" target="_blank"><img src="wp-content/themes/website1/images/103.png" /></a></li>
							  <li><a href="http://cozyconetech.com/product/215/" target="_blank"><img src="wp-content/themes/website1/images/104.png" /></a></li>
						</ul>
                  </div>
            	<div class="right-content-line">
                	BESTSELLERS
                </div>
                <div class="products-content">
                	<?php 
					$count = 0;
					?>
						<?php 
						
						$args = array( 'post_type' => 'product'
							, 'stock' => 1
							, 'orderby' =>'rand'
							,'order' => 'DESC' 
						);
        				$loop = new WP_Query( $args );
						
						while($loop->have_posts()) : $loop->the_post(); 
							global $product;
						
						?>
                        <?php 
							$count ++; 
							if($count > 8)
							{
								break;
							}
						?>
                        	<div class="right-best-sellers">
                                <?php don_the_thumbnail(); ?>
                                <div class="product-title"><a href='<?php the_permalink(); ?>'><?php echo $loop->post->post_title ?></a></div>
                                <a href='<?php the_permalink(); ?>'><div class="product-price"><?php echo $product->get_price_html(); ?></div></a>
                    		</div>
						<?php endwhile; ?>
                </div><!-- products-content -->
                <div class="right-content-line">
                	PRODUCTS FOR SALE
                </div>
                <div class="products-content2">
                
                <?php 
                		$count = 0;
						$args = array( 'post_type' => 'product'
							, 'stock' => 1
							, 'orderby' =>'rand'
							,'order' => 'DESC' 
						);
        				$loop = new WP_Query( $args );
						
						while($loop->have_posts()) : $loop->the_post(); 
							global $product;
							$count ++; 
							if($count > 4)
							{
								break;
							}
						?>
                    		<div class="right-best-sellers">
		                        <?php don_the_thumbnail(); ?>
		                        <div class="product-title"><a href='<?php the_permalink(); ?>'><?php echo $loop->post->post_title ?></a></div>
                                <a href='<?php the_permalink(); ?>'><div class="product-price"><?php echo $product->get_price_html(); ?></div></a>
                    		</div>
						<?php endwhile; ?>
                </div>
            </div><!-- right-content -->
		</div>
	</div>
    <div class="footer"><br /></div>
</body>
</html>